package com.aco.party.model.vo.common;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * ajax请求列表返回对象 Created by Hays on 14/11/9.
 */
@Data
public class Page<T> extends AbstractJsonEntity {
	/**
	 * 满足条件的结果总数
	 */
	private int total = 0;
	/**
	 * 返回数据
	 */
	private List<T> rows = new ArrayList<>();

	public static <T> Page<T> getEmpty() {
		Page<T> pageEntry = new Page<>();
		pageEntry.setRows(new ArrayList<T>());
		pageEntry.setTotal(0);
		return pageEntry;
	}
}
